.TH HATTRICK 1 "January 23, 2010" "GNU" "Hattrick n-Body Simulator"
.SH NAME
hattrick
.SH DESCRIPTION
Simple but accurate N-Body integrator meant for high control over small systems, specifically meant for introducing and analyzing the effects of perturbing bodies. Uses GSL ODE solver to solve the equations of motions. Useful high-accuracy astrodynamic constants we use.

Input format:
.in 10
hattrick baseSys
.in 10
hattrick baseSys n m1 r1 ... mn rn

Where:
.in 13
baseSys: Name of the file specifying the base system.
.in 13
n (optional): Number of perturbing bodies.
.in 13
mn (optional): Mass of the nth perturbing body.
.in 13
rn (optional): Radius of the nth perturbing body.

.in 7
Base system file format:
.in 10
n t0 t1 hmin hmax accr stepType numEvents
.in 10
cs1 m1 x1 y1 z1 vx1 vy1 vz1
.in 10
cs2 m2 a2 e2 i2 node2 w2 M2
.in 10
         ...
.in 10
csn mn xn yn zn vxn vyn vzn
.in 10
eventType_1 eventParams_1...
.in 10
         ...
.in 10
eventType_n eventParams_n...


Where:
.in 13
n: Number of bodies in the base system.
.in 13
t0: Initial system time.
.in 13
t1: Final system time.
.in 13
hmin: Minimum time step.
.in 13
hmax: Max time step.  Also the initial step size.
.in 13
accr: Accuracy paramater.
.in 13
skipPrint:
.in 16
>0 to specify the time skipped between prints.
.in 16
=0 to print on orbits only.
.in 16
<0 to print just the closest orbit time.
.in 13
stepType: 0 for rk45, 1 for rk8pd, 2 for bsimp.
.in 13
cs: Coordinate system (0 for state vectors,
.in 13
                       1 for keplarian elements).

Events:
.in 10
eventType: 0 for Timed Print,
.in 10
           1 for All Orbits,
.in 10
           2 for Closest Orbit.
.in 10
Timed Print eventParams:
.in 10
    printSkip printType
.in 10
All Orbits eventParams:
.in 10
    planetIndex printType
.in 10
Closest Orbits eventParams:
.in 10
    planetIndex orbitToFind printType

Where:
.in 10
printType: Directions for printing.
.in 10
    0) Time only
.in 10
    1) State Vectors
.in 10
    2) Keplerian Elements
.in 10
    3) Total Angular momentum and Energy
.in 10
printSkip: Time to skip between print outs.
.in 10
planetIndex: Index of planet to watch.
.in 10
orbitToFind: Time for which to find the closest orbit.

.SH EXAMPLE
.in 7
hattrick
.in 10
Prints the help shown above.

.in 7
hattrick sunearth.dat
.in 10
This will run a integration of the Sun and Earth.	

.in 7
hattrick sunearth.dat 1 9.5492E-4 5.204267 > out.txt
.in 10
This will run a integration of the Sun, Earth and a circularized Jupiter and direct the ouput into 'out.txt'.


.SH AUTHOR
   			  William Olson <wtolson@gmail.com>
